<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<h3>首页</h3>
<p th:text="${msg}"></p>
<hr>
<div th:if="${session.USER_SESSION==null}">
    <a th:href="@{/toLogin}">登录</a>
</div>

<div shiro:hasPermission="user:add">
    <a th:href="@{/user/add}">add</a>&nbsp;
</div>
<div shiro:hasPermission="user:update">
    &nbsp;<a th:href="@{/user/update}">update</a>
</div>

</body>
</html>